﻿
@using ChGK.Data;
@{
    ViewBag.Title = "Проверка ответов";
    Layout = "~/Views/Shared/_LayoutSuperuser.cshtml";
}

<h2>Проверка ответов</h2>

@using (Html.BeginForm())
{
    <div class="editor-label">
        Номер вопроса: @ViewData["QuestionNumber"]
        @Html.Hidden("QuestionNumber", ViewData["QuestionNumber"])
    </div>
    <div class="editor-label">
        Номер тура: @ViewData["TourNumber"]
        @Html.Hidden("TourNumber", ViewData["TourNumber"])
    </div>
    
    <table>
        <tr>
            <td>Ответ</td>
            <td><pre> Да </pre></td>
            <td><pre> Нет </pre></td>
        </tr>
        
        @for (int i = 0; i < 1; i++)
        {
            foreach (Answer a in (IEnumerable<Answer>)ViewData["Answers"])
            {
                string s = "IsCorrect[" + i + "]";
                i++;
            <tr>
                @Html.Hidden("AnswerID", a.ID)
                
               <td>@a.Value</td>
               <td align = "center">@Html.RadioButton(s, 2, a.IsCorrect == true)</td>
               <td align = "center">@Html.RadioButton(s, 1, a.IsCorrect == false)</td>
               @Html.Hidden(s, 0)
            </tr>    
            }
        }
    </table>
     <p>
       <input type = "submit" value = "Ок" />
     </p>
}